Generational Garbage Collection of C++ Targeted to SPARC Architectures
نویسندگان
چکیده
Dynamic memory management plays a crucial role in the development of large software systems. Traditional techniques for managing dynamic memory require the programmer to free an allocated object when it is no longer required. In addition to posing an intellectual burden on the programmer, this approach has often proved error-prone. Many bugs in existing software systems are known to be caused by dynamic memory management errors. Garbage collectors free the programmer from this intellectual burden by automatically reclaiming allocated objects that are no longer in use. In systems with garbage collection, the programmer need not concern himself with releasing objects no longer in use. Most traditional garbage collectors suspend the application program during the collection process. Generational garbage collectors are known to achieve short pause times as they rely on the observation that most objects die young. They concentrate most of their efforts in reclaiming recently allocated objects, occasionally performing a complete collection. In this project, we have implemented a generational garbage collector for C++ targeted to SPARC architectures. Our technique imposes only minor restrictions on the usage of dynamic memory in C++ and runs on stock hardware. Introduction Dynamic management of memory allows memory to be used for different purposes during different execution phases of a program. Without dynamic memory management, application developers are often forced to statically allocate memory for all the anticipated needs of their applications. This results in artificially rigid constraints on applications and leads to poor utilization of memory. Buffers are not allowed to expand or shrink depending on changing circumstances. Static allocation results in increased hardware costs, because each word of memory serves only one purpose throughout the execution of the application. Segments of memory that are not currently in use sit idle. They cannot be temporarily reallocated to serve different needs. Dynamic memory systems allow sharing of memory between different execution phases of an application to reduce system costs. They allow common memory resources to be shared between multiple components and facilitate flexible system reconfiguration in response to changes in workload or operating environment. Dynamic resizing of buffers and other data structures is possible depending on the current application requirements so as not to arbitrarily restrict user interaction and data inputs. In a system with dynamic memory management, a user process is often provided with a free pool of memory, referred to as the heap. All the allocation requests for dynamic memory are satisfied from the heap. A user process allocates dynamic memory with the new operator, which is implemented using the malloc function. Traditional techniques for dynamic memory management maintain linked lists of free memory segments. These are called free lists. Allocation involves traversing the free lists in search of a segment of a size that is appropriate to satisfy the allocation request. The application developer uses the delete operator, which is implemented in terms of free, to return previously allocated memory to the free pool. free links the released object onto the free list, possibly coalescing it with neighboring free objects before linking it onto the appropriate list. 1 Portions of this paper were excerpted from Code Generation to Support Efficient Accurate Garbage Collection of C++ on Stock Hardware, a paper currently being prepared for publication by Kelvin Nilsen, Ravichandran Ganesan, Satish Guggilla, Satish Kumar, and Kannan Narasimhan.
منابع مشابه
Concurrent Remembered Set Refinement in Generational Garbage Collection
Generational garbage collection divides a heap up into two or more generations, and usually collects a youngest generation most frequently. Collection of the youngest generation requires identification of pointers into that generation from older generations; a data structure that supports such identification is called a remembered set. Various remembered set mechanisms have been proposed; these...
متن کاملComparison of Garbage Collectors Operating in a Large Address Space
We analyze the performance of several copying garbage collection algorithms in a large address space offered by modern architectures. In particular, we describe the design and implementation of the RealOF garbage collector, an algorithm explicitly designed to exploit the features of 64-bit environments. This collector maintains a correspondence between object age and object placement in the add...
متن کاملGenerational Garbage Collection without Temporary Space Leaks for Lazy Functional Languages
Generational garbage collection is an established method for creating eecient garbage collectors. Even a simple implementation where all nodes that survive one garbage collection are tenured, i.e., moved to an old generation , works well in strict languages. In lazy languages, however, such an implementation can create severe temporary space leaks. The temporary space leaks appear in programs t...
متن کاملGarbage Collection With a Large Address Space for Server Applications
We analyze the performance of several copying garbage collection algorithms in a large address space offered by modern architectures. In particular, we describe the design and implementation of the RealOF garbage collector, an algorithm explicitly designed to exploit the features of 64-bit environments. This collector maintains a correspondence between object age and object placement in the add...
متن کاملGenerational Garbage Collection for Lazy Functional Languages without Temporary Space Leaks
Generational garbage collection is an established method for creating eecient garbage collectors. Even a simple implementation where all nodes that survive one garbage collection are tenured, i.e., moved to an old generation, works well in strict languages. In a lazy language, however, such an implementation can create severe temporary space leaks. The temporary space leaks appear in programs t...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014